import nacos

SERVER_ADDRESSES = "127.0.0.1:8848"

def register_nacos(service_name, port):
    client = nacos.NacosClient(SERVER_ADDRESSES, namespace="public")
    client.add_naming_instance(service_name, "127.0.0.1", port)
    print(f"Registered {service_name} to Nacos on port {port}")